package com.qingcheng.dao;

import com.qingcheng.pojo.system.Admin;
import com.qingcheng.pojo.system.Role;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface AdminMapper extends Mapper<Admin> {

    @Select("SELECT * from tb_role where id in (SELECT role_id from tb_admin_role where admin_id = #{adminId})")
    public List<Role> findRolesByAdminId(Integer adminId);

}
